using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using EntLibEC.Cmn;
using EntLibEC.Biz;
using EntLibEC.Biz.Finance;

namespace EntLibEC.View.Cmn
{
    public partial class IncomeConfirmer : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public void BindIncomeConfirmer(bool isAll)
        {
            ddlIncomeConfirmer.Items.Clear();
            ddlIncomeConfirmer.DataSource = SOIncomeManager.GetInstance().GetIncomeConfirmer();
            ddlIncomeConfirmer.DataValueField = "usersysno";
            ddlIncomeConfirmer.DataTextField = "username";
            ddlIncomeConfirmer.DataBind();
            if (isAll)
                ddlIncomeConfirmer.Items.Insert(0, new ListItem(AppConst.AllSelectString, AppConst.IntNull.ToString()));
        }

        public int IncomeConfirmerSysNo
        {
            get
            {
                return Convert.ToInt32(ddlIncomeConfirmer.SelectedItem.Value);
            }
            set
            {
                ddlIncomeConfirmer.SelectedIndex = ddlIncomeConfirmer.Items.IndexOf(ddlIncomeConfirmer.Items.FindByValue(value.ToString()));
            }
        }
    }
}